<h1 style="padding:20px 10px 5px 15px;font-size:16px;text-align:center;">Read me before Payment</h1>
<div style="padding:10px 45px 0px 45px;color:green;font-weight:bold;line-height:18px;">1. The below address should be the same as the one that you used for credit card application(it can be different from your shipping address). Otherwise it might cause payment failure.</div>
<div style="padding:10px 45px 0px 45px;">2. To ensure smooth transaction, please complete the payment within 48 hours. Otherwise, you will need to make a new order. </div>
<div style="padding:10px 45px 0px 45px;line-height:18px;">3. You are using the FashionPay visa payment method. It is verified by Trustwave and it is secured by Norton which can protect your credit card and other confidential information.</div>
<div style="padding:10px 45px 0px 45px;">4. Any problems about payment? Please let us know. You can post on our <a style="text-decoration:underline;" target="_blank" href="http://www.facebook.com/newjerseysoccer.Soccer.Jersey">Facebook</a>, or <a style="text-decoration:underline;" target="_blank" href="http://chat.5251.net/client.jsp?flag=1&companyId=8522&style=18846&locate=en">live chat</a> with our customer service.</div>
<link rel="stylesheet" type="text/css" href="<?=MY_URL?>/html/styles/shop/shop_buy.css" media="screen" />
<style>
	.moneyTable td{
		padding:10px;
	}
</style>
<br/><br/>
<?php 
	$member = new CMember();
	$db = $member->getAdapter();
	$sql = 'select * from  zcshop_countries';
	$rows = $db->fetchAll($sql);
?>
<div align="center">
<form action="https://ewallet.altercards.com/index.php/Gateway/paygates" method="post">
<table class="moneyTable" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9" width="600">
	<tr>
		<td align="right">Amounts</td><td>$<?=$this->Amount?></td>
	</tr>
	<tr>
		 <td align="right">First Name:</td>
		 <td align="left"><input name="firstname" type="text" value="<?php echo $this->firstname;?>"/> 
		 <input name="merchantid" type="hidden" value="<?php echo $this->merchantid;?>"/>
			<input name="siteid" type="hidden" value="<?php echo $this->siteid;?>"/>
			<input name="order_id" type="hidden" value="<?php echo $this->order_id;?>"/>
			<input name="phone" type="hidden" value="<?php echo $this->phone;?>"/>
			<input name="email" type="hidden" value="<?php echo $this->email;?>"/>
			<input name="Amount" type="hidden" value="<?php echo $this->Amount;?>"/>
			<input name="currency_code" type="hidden" value="USD"/>
			<input name="md5_info" type="hidden" value="<?php echo $this->md5_info ?>"/>
		 </td>
    </tr>
    <tr>
		 <td align="right">Last Name:</td>
		 <td align="left"><input name="lastname" type="text" value="<?php echo $this->lastname;?>"/></td>
    </tr>
   
    <tr>
		 <td align="right">Country:</td>
		 <td align="left">
		 <select name="country" onchange="changeZone(this.value)">
		 <option value="0">Select</option>
		 <?php foreach ($rows as $v):?>
		 <option value="<?php echo $v['countries_iso_code_2'];?>"><?php echo $v['countries_name'];?></option>
		 <?php endforeach;?>
		 </select>
		 </td>
    </tr>
     <tr>
		 <td align="right">State:</td>
		 <td align="left" id="state">
		 <select name="state">
		 	<?php foreach ($us as $k=>$v):?>
		 	<option value="<?php echo $k;?>"><?php echo $v;?></option>
		 	<?php endforeach;?>
		 </select>
		 </td>
    </tr>
    <tr>
		 <td align="right">Address:</td>
		 <td align="left"><input name="address" type="text" value="<?php echo $this->address;?>"/></td>
    </tr>
    <tr>
		 <td align="right">City:</td>
		 <td align="left"><input name="city" type="text" value="<?php echo $this->city;?>"/></td>
    </tr>
    <tr>
		 <td align="right">Post Code:</td>
		 <td align="left"><input name="postcode" type="text" value="<?php echo $this->postcode;?>"/></td>
    </tr> 
    <tr>
		 <td align="right"></td>
		 <td align="left"><input type="submit" value="submit"/></td>
    </tr>
</table>
</div>
</form>

<div style="margin-top:10px;">
	<iframe id="paymentFrame" name="paymentFrame" frameborder="0" scrolling="no" height="1000px" width="1000px" ></iframe>
</div>
<script>
	function changeZone(zone)
	{
		url = '/tool-zone?code='+zone;
		$.ajax({
			type: "get",
			url: url,
			success: function(data) {	
				if (data) {
					$('#state').html('<select name="state">'+data+'</select>');
				} else {
					$('#state').html('<input name="state" type="text"/>');
				}
			}			
		});
	}
</script>